GET ARRAY TYPE

This command will return the internal type index of the structure being used by the array.

  Syntax
Return Integer=GET ARRAY TYPE(Array Name(0))
  Parameters
Array Name(0)
Integer
Array name of the array to obtain the type index from

  Returns

This value is an integer number such as 1.

  Description

You can use this value with the GET TYPE PATTERN$() command to obtain the full structure pattern of the type indicated.

  Example Code
type firsttype
a as integer
b as string
c as float
endtype
type secondtype
e as DWORD
x as firsttype
d as double integer
endtype
dim myarray(5) as secondtype
for i=0 to 5
myarray(i).e=i*2
myarray(i).x.a=i
next i
typeindex=get array type(myarray())
print "ARRAY TYPE=";typeindex
print "TYPE IN ARRAY=";get type pattern$("",typeindex)
print "TYPE PATTERN=";get type pattern$("firsttype",0)
for i=0 to 5
print myarray(i).x.a;" ";myarray(i).e
next i
wait key
  See also

CORE Commands Menu
Index